<?php

$inhead = '
<script type="text/javascript">
<!--
  _editor_url = "'.$cfgPaths['AdminUrl'].'cms/wysiwyg/HTMLArea/";
  _editor_lang = "de";
//-->
</script>
<script type="text/javascript" src="'.$cfgPaths['AdminUrl'].'cms/wysiwyg/HTMLArea/htmlarea.js"></script>
<script language="javascript" src="'.$modRootUrl.'lib/js/ua.js">
</script>
<script language="javascript">
<!--
    function createImage (src,width,height)
    {
        var img = new Image(width,height)
        img.src = src
        return img
    }
    
    var rmouse = createImage(\''.$modRootUrl.'lib/img/rainbow_mouse.gif\',27,23)

      // load the plugins that we will use
      // loading is necessary ONLY ONCE, regardless on how many editors you create
      // basically calling the following functions will load the plugin files as if
      // we would have wrote script src="..." but with easier and cleaner code
      HTMLArea.loadPlugin("TableOperations");
      HTMLArea.loadPlugin("CSS");

        var css_plugin_args = {
          combos : [
            { label: "Syntax",
                         // menu text       // CSS class
              options: { "None"           : "",
                         "Code" : "code",
                         "String" : "string",
                         "Comment" : "comment",
                         "Variable name" : "variable-name",
                         "Type" : "type",
                         "Reference" : "reference",
                         "Preprocessor" : "preprocessor",
                         "Keyword" : "keyword",
                         "Function name" : "function-name",
                         "Html tag" : "html-tag",
                         "Html italic" : "html-helper-italic",
                         "Warning" : "warning",
                         "Html bold" : "html-helper-bold"
                       },
              context: "pre"
            },
            { label: "Info",
              options: { "None"           : "",
                         "Quote"          : "quote",
                         "Highlight"      : "highlight",
                         "Deprecated"     : "deprecated"
                       }
            }
          ]
        };

    var initFunctions = new Array();

      function initDocument() {
        var i;
        for (i = 0; i< initFunctions.length; i++)
        {
            initFunctions[i](i);
        }
      }

    var initFun = function ()
        {
            var editor = new HTMLArea("body")

            //editor.registerPlugin(ContextMenu)
            editor.registerPlugin(TableOperations)
            editor.registerPlugin(CSS, css_plugin_args)
    
              editor.config.pageStyle = "@import url(custom.css);"
    
            setTimeout(function() {
              editor.generate()
            }, 500)
        }
    
    initFunctions = initFunctions.concat(initFun)
    

//-->
</script>';

$onload = "initDocument()";

?>